<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改渠道代理商提现')" />
    <th:block th:include="include :: datetimepicker-css" />
    </head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-payment-edit" th:object="${channelPayment}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">提现代理商：</label>
                <div class="col-sm-8">
                    <input name="applyAgentId" th:field="*{applyAgentId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">直属代理商：</label>
                <div class="col-sm-8">
                    <input name="agentId" th:field="*{agentId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">账号类型：</label>
                <div class="col-sm-8">
                    <select name="bankAccountType" class="form-control m-b" th:with="type=${@dict.getType('ls_bank_account_type')}">
                        <option  th:field="*{bankAccountType}" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">账户类型：</label>
                <div class="col-sm-8">
                    <select name="accountType" class="form-control m-b" th:with="type=${@dict.getType('ls_account_type')}">
                        <option th:field="*{accountType}" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">提现金额：</label>
                <div class="col-sm-8">
                    <input name="applyAmount" th:field="*{applyAmount}" class="form-control" type="text" required>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "channel/payment";
        $("#form-payment-edit").validate({
            focusCleanup: true
        });

        $("input[name='date']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-payment-edit').serialize());
            }
        }
    </script>
</body>
</html>